<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class ProductClassBranch
 * 
 * @property int $id
 * @property int|null $branch_id
 * @property int|null $product_class_id
 * @property Carbon|null $create_time
 * @property Carbon|null $update_time
 * @property int|null $is_display
 * 
 * @property Branch|null $branch
 * @property ProductClass|null $product_class
 *
 * @package App\Models
 */
class ProductClassBranch extends Model
{
	protected $table = 'product_class_branch';

	protected $casts = [
		'branch_id' => 'int',
		'product_class_id' => 'int',
		'is_display' => 'int'
	];

	protected $fillable = [
		'branch_id',
		'product_class_id',
		'is_display'
	];

	public function branch()
	{
		return $this->belongsTo(Branch::class);
	}

	public function product_class()
	{
		return $this->belongsTo(ProductClass::class);
	}
}
